﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Templates_Store_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" Runat="Server">
    <style type="text/css">
            dl.form
            {
            }
            
            dl.form dd
            {
                text-align:right;
                float:left;
                width:100px;
                min-width:100px;
                min-height:1em;
                clear:both;
            }
            
            dl.form dt
            {
                text-align:left;
                float:left;
            }
    </style>
    
    <script type="text/javascript">

        $(document).ready(function() {

            $(".legalHolder").hide(); 
            //remove default behaviour for info pop up
            $(".legalbtn").click(
            function(event) { event.preventDefault(); }
            );

            $(".legalbtn").click(function() {
                $(".legalHolder").slideToggle("slow");
            });
        });


    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="cphMain" Runat="Server">
    
    <div style="float:right">
        <div class="bl">
            <div class="br">
                <div class="tl">
                    <div class="tr">
                        <acms:PostThumbnail ID="PostThumbnail1" HyperLink="false" RenderWidth="250" RenderHeight="300" runat="server" />
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <div style="float:left; float:left; width:480px;">
        <asp:PlaceHolder ID="phStart" runat="server" Visible="true">
            <div id="BaristaDetails">
                <h2 style="margin-bottom:5px"><acms:TextContentControlDisplay ID="txtBarrista" ControlName="Barrista Name" runat="server" /></h2>
                <acms:HtmlContentControlDisplay ID="htmlIntroduction" ControlName="Barrista Text" runat="server" />
            </div>
            
            <div id="StoreDetails" style="margin:40px 0px 20px 0px">
                <div class="bl">
                    <div class="br">
	                    <div class="tl">
                            <div class="tr">
                                <h3><acms:PostDisplayName ID="displayName" runat="server" /></h3>
                                <acms:TextContentControlDisplay ID="txtAddress" ControlName="Address" OnDataBound="txtAddress_DataBound" runat="server" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <asp:ImageButton ID="btnShowForm" CssClass="BtnShowForm" ImageUrl="~/Images/CoffeeBean_ClickToVote.gif" runat="server" OnClick="btnShowForm_Click" />
        
        </asp:PlaceHolder>
        
        <asp:PlaceHolder ID="phVoteForm" runat="server" Visible="false">
            <h3>Please Fill in your details...</h3>
            <ul class="form">
                <li class="formLi clearfix">
                    <asp:Label CssClass="formLabel" ID="lblFirstName" Text="First Name *" runat="server" />
                    <asp:TextBox ID="txtFirstName" CssClass="formItem" runat="server" />
                    <asp:RequiredFieldValidator ID="valFirstNameReq" ControlToValidate="txtFirstName" ValidationGroup="Vote" ErrorMessage="!Required" Display="Dynamic" runat="server" />
                </li>
                <li class="formLi clearfix">
                    <asp:Label ID="lblLastName" CssClass="formLabel" Text="Last Name *" runat="server" />
                    
                    <asp:TextBox ID="txtLastName" CssClass="formItem" runat="server" />
                    <asp:RequiredFieldValidator ID="valLastName" ControlToValidate="txtLastName" ValidationGroup="Vote" ErrorMessage="!Required" Display="Dynamic" runat="server" />
                
                </li>
                <li class="formLi clearfix">
                    <asp:Label ID="lblEmail" CssClass="formLabel" Text="Email*" runat="server" />
                
                    <asp:TextBox ID="txtEmail" CssClass="formItem" runat="server" />
                    <asp:RequiredFieldValidator ID="valEmailReq" ControlToValidate="txtEmail" ValidationGroup="Vote" ErrorMessage="!Required" Display="Dynamic" runat="server" />
                    <asp:RegularExpressionValidator ID="valEmailFormat" ControlToValidate="txtEmail" ValidationGroup="Vote" ErrorMessage="Please Enter a valid email address" Display="Dynamic" ValidationExpression="^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z+])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$" runat="server" />
                
                </li>
                
                <li class="formLi clearfix">
                
                    <asp:Label ID="Label1" CssClass="formLabel" Text="Phone*" runat="server" />
                
                    <asp:TextBox ID="txtContactTel" CssClass="formItem" runat="server" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtContactTel" ValidationGroup="Vote" ErrorMessage="!Required" Display="Dynamic" runat="server" />
                    
                    </li>
                
                <li class="formLi clearfix">
                    <asp:CheckBox ID="chkUpdates" TextAlign="Right" runat="server" />
                    <asp:Label runat="server" AssociatedControlID="chkUpdates">
                        Please tick here if you do not wish to receive any mailings from Muffin Break or their associated companies. 
                        <a href="#" class="legalbtn" style="color:#000000">Click to read read more...</a>
                    </asp:Label>
                </li>    
                <li>
                    
                    <div class="legalHolder">
                    <p class="legalText">We will never release your personal details to any company outside the Foodco Group Pty for mailing or marketing purposes.</p>
                    <p class="legalText">However, we would like to keep you up to date with the range of products and services provided. This includes news of special events and promotions.</p>
                    
                    </div>
                </li>
                <li >
                    <asp:Button ID="btnSubmit" Text="Vote" ValidationGroup="Vote" OnClick="btnSubmit_Click" runat="server" />
                </li>
                
            </ul>
        </asp:PlaceHolder>
        
        <asp:PlaceHolder ID="phVoted" Visible="false" runat="server">
            <div class="ThanksForVotingForMe">
                <asp:Image ImageUrl="~/Images/ThanksForVotingForMe.gif" CssClass="ThanksForVotingForMe_img" runat="server" />
                <p style="margin-top:20px">I now have <asp:Label ID="lblVoteAverage" runat="server" /> of the votes</p>
            </div>
        </asp:PlaceHolder>
        <asp:PlaceHolder ID="phAlreadyVoted" Visible="false" runat="server">
            <h3>You have already voted!</h3>
            <p>If you would like to transfer your vote then click the button below.</p>
            <asp:Button ID="btnTransfer" OnClick="btnTransfer_Click" Text="Transfer My Vote" runat="server" />
        </asp:PlaceHolder>
    </div>
    
</asp:Content>

